#include "stdio.h"
#include "stdlib.h"

int max(int, int);
int min(int, int);

int main()
{
    int a = 10, b = 20;
    int c;

    // declare function pointer
    int (*pf)(int, int);
    pf = max;
    c = pf(a, b);

    printf("max = %d\n", c);

    pf = min;
    c = (*pf)(a, b);
    
    printf("min = %d\n", c);

    return 0;
}

int max(int x, int y)
{
    return x > y ? x : y;
}

int min(int x, int y)
{
    return x < y ? x : y;
}
